@override multiple markers at this line

您所在的位置:网站首页 java中multiple markers at this line @override multiple markers at this line

@override multiple markers at this line

2024-07-07 14:03| 来源: 网络整理| 查看: 265

multiple markers at this line 关于@Override注解在Eclipse中JDK1.5编译下报错的解释, 请看Eclipse给以的解释:在实现Runnable 的 run()方法上有如下的错误提示信息: Multiple markers at this line - The method run() of type ClassName must override a superclass method - implements java.lang.Runnable.run 但是当我们使用extends Thread 并且也implements Runnable接口时, 注解@Override则顺利通过,所以我们能够知道产生@Override处报错的原因是在jdk5中,实现接口方法不能用 @Override ,只有重写抽象方法可以用。 这一 问题在JDK1.6中已经可以编译通过。 对于网络上提到的兼容模式,是在 Eclipse->Window-Preferences->Java->Compiler Use default compiliance settings  里面有关于兼容性方面的一些设置,大家可以根据自己的需求来设置。



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3